﻿using HARTCalibrationTool.SerialPortManager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HARTCalibrationTool.Commands.HART
{
    public class HART45TrimLoopCurrentZero : HARTCMDsBase
    {
        public HART45TrimLoopCurrentZero(SerialPortsBase serialPortManager, string commandName) : base(serialPortManager, commandName)
        {

        }

        protected override async Task SendCMD()
        {
            byte[] deviceID = GetDeviceID();
            byte[] cmdCode = null;
            byte[] tempData = new byte[32];

            if ((deviceID[0] == 0x00) && (deviceID[1] == 0x00) && (deviceID[2] == 0x00))
            {
                SerialPortsBase.PrintMessage("通道" + Utils.CountTrailingZeros((uint)GetCMDsChannelID()).ToString() + ", Device ID 错误！");
                return;
            }
        }

        public override async Task ParseResponse(byte[] data)
        {

        }

        public override void OnFailure()
        {

        }

        public override void OnSuccess()
        {

        }

        public override void OnTimeout()
        {

        }
    }
}
